package com.chixing.day19_thread.work;

public class Singleton {
    private Singleton(){}

    public static enum SingletonEnum{
        BANK;
        private Singleton singleton = null;
        private SingletonEnum(){
            singleton = new Singleton();
        }
        public Singleton getInstance(){
            return singleton;
        }
    }

    public static void main(String[] args) {
        Singleton singleton =  SingletonEnum.BANK.getInstance();
        System.out.println(singleton);

    }
}
